﻿using System;

namespace enyo
{
    /// <summary>
    /// To use this control, you need add reference "$enyo-lib/printdialog/" to depends.json
    /// </summary>
    public class PrintDialog : ModalDialog
    {
        public Range CopiesRange { get; set; }
        public bool DuplexOption { get; set; }// None, Book, Tablet
        public bool MediaSizeOption { get; set; }// US_Letter, US_Legal, ISO_A4, Photo_4x6
        public bool MediaTypeOption { get; set; }// Plain, Special, Photo
        public bool ColorOption { get; set; }// Mono, Color
        public Range PageRange { get; set; }
        public bool QualityOption { get; set; }// Fast, Normal, Best
        public PrintMargin Margin { get; set; }

        public string[] ImagesToPrint { get; set; }
        public string ImagePath { get; set; }
        public FrameToPrint FrameToPrint { get; set; }
        public string Description { get; set; }
        public string AppName { get; set; }

        public EnyoEvent<Control, int, object> onRenderDocument;
    }

    public class Range
    {
        public int Min;
        public int Max;
    }

    public class PrintMargin
    {
        public float Top;
        public float Left;
        public float Right;
        public float Bottom;
    }

    public class FrameToPrint
    {
        public static implicit operator FrameToPrint(string val)
        {
            return null;
        }

        public string Name;
        public bool Landscape;
    }
}
